home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / guvenlik / syslinux-3.07.exe / sample / comecho.asm < prev    next >
Encoding:
Assembly Source File  |  2003-11-23  |  436 b   |  35 lines

  1. ;
  2. ; Simple COMBOOT program that just prints out its own command line.
  3. ; This also works in DOS.
  4. ;
  5.  
  6.     org 100h
  7.  
  8. _start:
  9.     xor cx,cx
  10.     mov cl,[80h]            ; Command line len
  11.     mov si,81h            ; Command line
  12.  
  13.     mov dl,"<"
  14.     mov ah,02h
  15.     int 21h
  16.     
  17. .writechar:
  18.     lodsb
  19.     mov dl,al
  20.     mov ah,02h
  21.     int 21h
  22.     loop .writechar
  23.  
  24.     mov dx,end_str
  25.     mov ah,09h
  26.     int 21h
  27.  
  28.     ; Exit with near return, INT 20h, or INT 21h AX=4C00h
  29.     ret
  30.     
  31.         
  32. end_str    db ">", 0Dh, 0Ah, "$"
  33.     
  34.     
  35.